package iscript.uiFramework.math 
{

	public class Point2D 
	{
		
		private var _x:Number;
		private var _y:Number;
		
		public function Point2D (x:Number = 0, y:Number = 0):void {
			_x = x;
            _y = y;
         }
     
	     public  function get x():Number {
		 return _x;
		 }	 
		 
		  public  function set x(value:Number):void {
		    _x = value;
		 }	 
		 
		 public  function get y():Number {
		 return _y;
		 }	  
		 
		   public  function set y(value:Number):void {
		    _y = value;
		 }	
		 
        public  function toString():String {
			   return  _x + "," + _y ;
			}
	
		public function clone():Point2D {
			return  new Point2D( this._x, this._y);
			}
			
		public function isEqual(point:Point2D):Boolean {
			  if (this._x == point.x && this._y == point.y) return true;
			  return false;
			}	
			
			
		static public function create(data:String):Point2D {
				 var arr:Array = data.split(",");
				 return  new Point2D(arr[0], arr[1]);
			}	
			
		

	}

}